﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Ciripescu_WebRole
{
    public partial class directmessages : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            // acest cod trebuie sa mentina tabul selectat cand se apasa linkul de next pt paginare
            // in mod normal se face un GET si nu putem mentine starea decat asa
            // acel link va contine parametrul msgtype corect (codul care face asta este in DisplayCirips.aspx.cs
            if (Request.QueryString["msgtype"] != null)
            {
                string type = Request.QueryString["msgtype"];

                if (type == DisplayCiripsType.Sent.ToString())
                    TabContainer1.ActiveTabIndex = 1;
                else
                if (type == DisplayCiripsType.Inbox.ToString())
                    TabContainer1.ActiveTabIndex = 0;
            }
            else
                TabContainer1.ActiveTabIndex = 0;
        }
    }
}
